package com.iot.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.iot.system.mapper.DeviceRelationMapper;
import com.iot.system.domain.DeviceRelation;
import com.iot.system.service.IDeviceRelationService;

/**
 * 【请填写功能名称】Service业务层处理
 * 
 * @author iot
 * @date 2025-01-03
 */
@Service
public class DeviceRelationServiceImpl implements IDeviceRelationService 
{
    @Autowired
    private DeviceRelationMapper deviceRelationMapper;

    /**
     * 查询【请填写功能名称】
     * 
     * @param id 【请填写功能名称】主键
     * @return 【请填写功能名称】
     */
    @Override
    public DeviceRelation selectDeviceRelationById(Long id)
    {
        return deviceRelationMapper.selectDeviceRelationById(id);
    }

    /**
     * 查询【请填写功能名称】列表
     * 
     * @param deviceRelation 【请填写功能名称】
     * @return 【请填写功能名称】
     */
    @Override
    public List<DeviceRelation> selectDeviceRelationList(DeviceRelation deviceRelation)
    {
        return deviceRelationMapper.selectDeviceRelationList(deviceRelation);
    }

    /**
     * 新增【请填写功能名称】
     * 
     * @param deviceRelation 【请填写功能名称】
     * @return 结果
     */
    @Override
    public int insertDeviceRelation(DeviceRelation deviceRelation)
    {
        return deviceRelationMapper.insertDeviceRelation(deviceRelation);
    }

    /**
     * 修改【请填写功能名称】
     * 
     * @param deviceRelation 【请填写功能名称】
     * @return 结果
     */
    @Override
    public int updateDeviceRelation(DeviceRelation deviceRelation)
    {
        return deviceRelationMapper.updateDeviceRelation(deviceRelation);
    }

    /**
     * 批量删除【请填写功能名称】
     * 
     * @param ids 需要删除的【请填写功能名称】主键
     * @return 结果
     */
    @Override
    public int deleteDeviceRelationByIds(Long[] ids)
    {
        return deviceRelationMapper.deleteDeviceRelationByIds(ids);
    }

    /**
     * 删除【请填写功能名称】信息
     * 
     * @param id 【请填写功能名称】主键
     * @return 结果
     */
    @Override
    public int deleteDeviceRelationById(Long id)
    {
        return deviceRelationMapper.deleteDeviceRelationById(id);
    }

    @Override
    public DeviceRelation selectDeviceDetailsBySubDeviceId(Long id) {
        DeviceRelation deviceRelation = deviceRelationMapper.selectDeviceDetailsBySubDeviceId(id);
        return deviceRelation;
    }
}
